home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wics.zip / DATEEDT.H < prev    next >
C/C++ Source or Header  |  1993-01-29  |  2KB  |  72 lines

  1. #ifndef _DATEEDT_H
  2. #define _DATEEDT_H
  3.  
  4. #include <wics.h>
  5. #include <edit.h>
  6.  
  7. #pragma option -Vo-
  8. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  9. #pragma option -po-
  10. #endif
  11.  
  12. _CLASSDEF (TDateEdit)
  13.  
  14. class TDateEdit : public TEdit
  15. {
  16. private:
  17.     virtual const Pchar streamableName() const { return "TDateEdit"; }
  18.  
  19. protected:
  20.     virtual LPSTR GetClassName() { return "WICSDateEdit"; }
  21.     virtual void SetupWindow();
  22.  
  23.     virtual void WMCommand(RTMessage) = [WM_FIRST + WM_COMMAND];
  24.  
  25.     TDateEdit(StreamableInit) : TEdit(streamableInit) {};
  26.  
  27. public:
  28.     TDateEdit (PTWindowsObject AParent, int ResourceId, PTModule AModule = NULL);
  29.     ~TDateEdit ();
  30.  
  31.     int  GetLineLength();
  32.     BOOL GetLine(LPSTR ATextString, int StrSize);
  33.     BOOL DeleteLine(int) { return !(BOOL) SendMessage(HWindow, WM_CLEAR, 0, 0); }
  34.  
  35.     //    Redefine the following functions to do nothing. They serve no purpose in the 
  36.     //    Date Edit control.
  37.         
  38.     BOOL CanUndo() { return FALSE; }
  39.     int  GetLineFromPos(int) { return 0; }
  40.     int  GetLineIndex(int) { return 0; }
  41.     void Scroll(int, int) { return; }
  42.     int  Search(int, LPSTR, BOOL) { return -1; }
  43.     void GetSubText(LPSTR, int, int) { return; }
  44.  
  45.     virtual void GetDate (long & lDays, Rint iMonth, Rint iDay, Rint Year);
  46.     virtual void GetMonth (Rint iMonth);
  47.     virtual void GetDay (Rint iDay);
  48.     virtual void GetYear (Rint iYear);
  49.  
  50.     virtual void GetEditParams (LPDECPARMS lpep);
  51.     virtual void SetEditParams (LPDECPARMS lpep);
  52.  
  53.     static PTStreamable build();
  54.  
  55. };
  56.  
  57. inline Ripstream operator >> ( Ripstream is, RTDateEdit cl )
  58.     { return is >> (RTStreamable )cl; }
  59. inline Ripstream operator >> ( Ripstream is, RPTDateEdit cl )
  60.     { return is >> (RPvoid)cl; }
  61.  
  62. inline Ropstream operator << ( Ropstream os, RTDateEdit cl )
  63.     { return os << (RTStreamable )cl; }
  64. inline Ropstream operator << ( Ropstream os, PTDateEdit cl )
  65.     { return os << (PTStreamable )cl; }
  66.  
  67. #pragma option -Vo.
  68. #if     defined(__BCOPT__) && !defined(_ALLOW_po)
  69. #pragma option -po.
  70. #endif
  71.  
  72. #endif